//
//  ZZQLiveChatViewController.m
//  zzqKanBoKe
//
//  Created by ben on 17/2/13.
//  Copyright © 2017年 张增强. All rights reserved.
//

#import "ZZQLiveChatViewController.h"

@interface ZZQLiveChatViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *peopleCountLB;

@end

@implementation ZZQLiveChatViewController

- (void)setLive:(ZZQLive *)live{
    _live = live;
    [self.iconView downloadImage:live.creator.portrait placeholder:@"default_room"];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.iconView.layer.cornerRadius = 15;
    self.iconView.layer.masksToBounds = YES;
    
    self.peopleCountLB.text = [NSString stringWithFormat:@"%u", arc4random_uniform(10000)];
    [NSTimer scheduledTimerWithTimeInterval:20 repeats:YES block:^(NSTimer * _Nonnull timer) {
        self.peopleCountLB.text = [NSString stringWithFormat:@"%u", arc4random_uniform(10000)];
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
